package com.easyui_server.manage.impl;

import com.easyui_server.dao.GroupDao;
import com.easyui_server.manage.CommonService;
import com.easyui_server.model.Group;
import com.solution.framework.model.BaseBean;
import com.solution.framework.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created with IntelliJ IDEA.
 * User: gg
 * Date: 14-4-11
 * Time: 下午5:16
 * To change this template use File | Settings | File Templates.
 */
@Service
public class CommonServiceImpl extends BaseServiceImpl<BaseBean> implements CommonService, Runnable {
    private String flag;

    @Resource
    private GroupDao groupDao;

    public CommonServiceImpl() {
    }

    public CommonServiceImpl(String flag) {
        this.flag = flag;
    }

    @Override
    public void run() {
        for (Group group : this.groupDao.listByHql()) {
            System.out.println("group = " + group.getName());
        }
        for (int i = 0; i < 100; i++) {
            System.out.println(flag + i);
        }
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
